package com.design.pattern.builder.product;

/**
 * Created by Administrator on 2016/5/18.
 */
public class AutoMessage {
    private String to;
    private String from;
    private String subject;
    private String body;
    private String date;

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public void send(){
        StringBuilder builder = new StringBuilder();
        builder.append("发送方："+this.getFrom());
        builder.append("\n接收方："+this.getTo());
        builder.append("\n主题："+this.getSubject());
        builder.append("\n内容："+this.getBody());
        builder.append("\n时间："+this.getDate());
        System.out.println(builder.toString());
    }
}
